/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.treasury.glasses.persistence;

import com.treasury.glasses.controller.helper.Maskable;
import java.io.IOException;
import java.net.URL;
import javafx.fxml.FXMLLoader;
import javafx.fxml.JavaFXBuilderFactory;

/**
 * Access various files.
 * @author <a href="mailto:glasses@audienz.eu">Jean-Luc Burot</a>
 */

public class FileAccess {
    public FXMLLoader getFXML(String path) throws IOException {
        URL location = getClass().getResource(path);
        
        FXMLLoader loader = new FXMLLoader();
        loader.setLocation(location);
        loader.setBuilderFactory(new JavaFXBuilderFactory());
        loader.load();
        
        return loader;
        //return (Pane) loader.load();
    }
}
